#ifndef __MEM_PCI_LIST_H__
#define __MEM_PCI_LIST_H__

#define   PCI_IO_CF8   0xCF8
#define   PCI_IO_CFC   0xCFC

#define   MAX_BUS_NUM        0xFF
#define   MAX_DEV_NUM        0x20
#define   MAX_FUN_NUM        0x08
#define   PCI_BASE_ASSRESS   0xC0000000

#define PCI_DEV_MMBASE(Bus, Device, Function) \
  ( \
    (UINTN)PCI_BASE_ASSRESS + (UINTN) (Bus << 20) + (UINTN) (Device << 15) + (UINTN)(Function << 12) \
  )

#define PCI_REG_BASE(Bus, Device, Function, Reg) (PCI_DEV_MMBASE(Bus, Device, Function) + Reg)


#define PCI_IO_CF8_ADDRESS(Bus, Device, Function) \
  ( \
    ((UINT32)(Bus << 16) | (UINT32)(Device << 11) | (UINT32)(Function << 8) | (0x80000000)) \
  )


typedef struct{
  UINT8   BaseClass;
  UINT8   SubClass;
  UINT8   Interface;
  CHAR16  *Name;
} PCI_CLASS_INFO;

typedef struct {
  UINT8  Encode;
  CHAR16 *String;
} LINK_WIDTH_SPEED;


#endif